package leetcode_core.leetcode_3;

public class MoveZeroes {
    public void moveZeroes(int[] nums) {
        int slow = 0,fast = slow;
        while (fast < nums.length){
            int cur = nums[fast];
            if(cur == 0){
                fast++;
                continue;
            }
            nums[slow++] = cur;
            fast++;
        }
        while (slow< nums.length){
            nums[slow++] = 0;
        }
    }
}
